﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI.Xaml;

namespace System.ComponentModel
{
    // Workaround for WinRT no longer needed


    //public static class Dependency
    //{
    //    private const string DOT = ".";

    //    public static DependencyProperty Register(string name, Type propertyType, Type ownerType, PropertyMetadata typeMetadata)
    //    {
    //        return DependencyProperty.Register(name, GetTypeShortName(propertyType), GetTypeShortName(ownerType), typeMetadata);
    //    }

    //    public static DependencyProperty Register(this DependencyProperty dependencyProject, string name, Type propertyType, Type ownerType, PropertyMetadata typeMetadata)
    //    {
    //        return DependencyProperty.Register(name, GetTypeShortName(propertyType), GetTypeShortName(ownerType), typeMetadata);
    //    }

    //    /// <summary>
    //    /// see http://www.sharpgis.net/post/2011/09/16/WinRT-vs-Silverlight-Part-3-Dependency-Properties.aspx
    //    /// </summary>
    //    /// <param name="type"></param>
    //    /// <returns></returns>
    //    private static string GetTypeShortName(Type type)
    //    {
    //        var _fullName = type.FullName;
    //        return _fullName.IndexOf(DOT) == -1 ? _fullName : _fullName.Substring(_fullName.LastIndexOf(DOT));
    //    }
    //}
}
